home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: MegaDisc / MegaDisc 06 (1988)(MegaDisc Digital Publishing)(AU)[m][WB].zip / MegaDisc 06 (1988)(MegaDisc Digital Publishing)(AU)[m][WB].adf / ARTICLES / AboutPrompts < prev    next >
Text File  |  1988-04-09  |  2KB  |  64 lines

  1.  
  2.  
  3.  
  4.              Custom Prompts And Echoes
  5.              *************************
  6.  
  7.     ED. NOTE: Anyone wanting to investigate this topic further might have
  8.     a look at previous Megadiscs through a Text Editor such as TxED, which
  9.     shows exactly what was done to get various effects. They couldn't be
  10.     done in this issue because PRINTEXT, the display utility, doesn't
  11.     handle them, at least with the ESC key. XICON, the previous display
  12.     utility, does so, but LESS gets upset if you use them.
  13.  
  14. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  15.     Both the PROMPT and ECHO commands found in the C directory can be
  16.     modified to issue some of the ANSI command characters in order to
  17.     change the displayed text in both colour and style. By using the same
  18.     techniques mentioned above, you can add colour to the CLI prompt or
  19.     anything "echoed" to the screen.
  20.  
  21.    To tell PROMPT or ECHO to accept the codes, a template of commands is
  22.      used.
  23.  
  24.    This template is:
  25.  
  26.            CSIstyle;forground;background
  27.  
  28.    CSI is Control Sequence Introducer, which can be ESC [ or in hex 1b 5b;
  29.    for the PROMPT and ECHO commands, it is *e.
  30.  
  31.     To modify the prompt try something like this:
  32.  
  33.           PROMPT "*e[3;33;41mCLUB AMIGA BBS> *e[0m"
  34.  
  35.     You should get an Italic "CLUB AMIGA BBS" in red on a white background.
  36.  
  37.     Following are the numbers for different effects:
  38.  
  39. STYLE
  40.         0 = Plain Text
  41.         1 = Bold Face
  42.         3 = Italic
  43.         4 = Underline
  44.         7 = Inverse
  45.  
  46. FOREGROUND
  47.         30 = Default
  48.         31 = White
  49.         32 = Binary complement color (black for Workbench default
  50.              colors)
  51.         33 = Red
  52.  
  53. BACKGROUND
  54.         40 = Default
  55.         41 = White
  56.         42 = Binary complement color
  57.         43 = Red
  58.     You can also combine styles by entering each style number separated by
  59.     a semicolon.
  60.  
  61.  
  62.  
  63. ~~~~~~~~~~~~~~~~~~~~~~~~~~~ END OF ABOUTPROMPTS ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  64.